<script type="text/html" template>
    <link rel="stylesheet" href="{{ layui.setter.base }}style/css/reset.css">
    <link rel="stylesheet" href="{{ layui.setter.base }}style/css/home/list.css">
    <link rel="stylesheet" href="{{ layui.setter.base }}style/css/home/datailed.css">
    <link rel="stylesheet" href="{{ layui.setter.base }}style/page.css">
</script>
<!-- 测试 -->
<form class="layui-form">
    <ul>
        <li>
            <div class="layui-form-item">
                <label class="layui-form-label">项目1</label>
                <div class="layui-input-block">
                    <input type="text" name="qq" placeholder="请输入" autocomplete="off" class="layui-input" lay-verify="required" lay-verType="tips" data-name="项目1" name="key">
                </div>
            </div>
        </li>
        <li>
            <div class="layui-form-item">
                <label class="layui-form-label">项目2</label>
                <div class="layui-input-block">
                    <input type="text" name="aa" placeholder="请输入" autocomplete="off" class="layui-input" lay-verify="required" lay-verType="tips" data-name="项目2" name="key">
                </div>
            </div>
        </li>
        <li>
            <div class="layui-form-item">
                <label class="layui-form-label">项目3</label>
                <div class="layui-input-block">
                    <input type="text" name="cc" placeholder="请输入" autocomplete="off" class="layui-input" lay-verify="required" lay-verType="tips" data-name="项目3">
                </div>
            </div>
        </li>
        <li>
            <div class="layui-form-item">
                <label class="layui-form-label">项目4</label>
                <div class="layui-input-block">
                    <input type="text" name="xx" placeholder="请输入" autocomplete="off" class="layui-input" lay-verify="required" lay-verType="tips" data-name="项目4">
                </div>
            </div>
        </li>
    </ul>
    <div>
        <div>
            <div class="layui-form-item">
                <div class="layui-input-block">
                    <button class="layui-btn" lay-submit lay-filter="*">立即提交</button>
                    <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                </div>
            </div>
        </div>
    </div>
</form>
<script>
    ! function() {
        //无需再执行layui.use()方法加载模块，直接使用即可
        var form = layui.form,
            layer = layui.layer,
            $ = layui.$,
            admin = layui.admin,
            view = layui.view,
            api = layui.api,
            table = layui.table,
            setter = layui.setter,
            laytpl = layui.laytpl,
            utill = layui.utill,
            form = layui.form,
            upload = layui.upload,
            element = layui.element;
        layui.use(['form', 'element'], function() { //此段代码必不可少
            var form = layui.form,
                element = layui.element,
                $ = layui.jquery;
            form.on('submit(*)', function(data) {
                return false; //阻止表单跳转。如果需要表单跳转，去掉这段即可。
            });
        });
    }();
</script>